package net.ewon.avatar.common.util;

import org.apache.commons.lang3.StringUtils;

public class FilePathUtils {

	public static String normalizeWin(String path) {
		String normalized = StringUtils.replace(path, "/", "\\\\");
		return StringUtils.removeEnd(StringUtils.removeEnd(normalized, "/"),
				"\\\\");
	}

	public static String normalizeLinux(String path) {
		String normalized = StringUtils.replace(path, "\\", "/");
		return StringUtils.removeEnd(StringUtils.removeEnd(normalized, "/"),
				"\\");
	}
}
